//index.js
//获取应用实例
const IndexModel=require('../../models/IndexModel')
Page({
  data: {
    artists:[]
  },
  onLoad() {
    IndexModel.getArtists().then(res=>{
      var {artists}=res.data;
      this.setData({
       artists
      })
    });
  },
  handleClick(event){
    var {id}=event.currentTarget.dataset;
    console.log(id);
    wx.navigateTo({
      url: '/pages/detail/detail?id='+id,
    });
  }
  
})
